<?php

namespace Wentaophp\Yii2Aop;


/**
 * @see Filesystem::ensureDirectoryExists
 * @method static void ensureDirectoryExists(string $path, int $mode = 0755, bool $recursive = true)
 * @see Filesystem::isWritable
 * @method static bool isWritable(string $path)
 * @see Filesystem::prepend
 * @method static bool|int prepend(string $path, string $data)
 * @see Filesystem::replace
 * @method static void replace(string $path, string $content, int|null $mode = null)
 * @see Filesystem::type
 * @method static string type(string $path)
 * @see Filesystem::dirname
 * @method static string dirname(string $path)
 * @see Filesystem::put
 * @method static bool|int put(string $path, string $contents, bool $lock = false)
 * @see Filesystem::copyDirectory
 * @method static bool copyDirectory(string $directory, string $destination, int|null $options = null)
 * @see Filesystem::hasSameHash
 * @method static bool hasSameHash(string $firstFile, string $secondFile)
 * @see Filesystem::relativeLink
 * @method static void relativeLink(string $target, string $link)
 * @see Filesystem::isFile
 * @method static bool isFile(string $file)
 * @see Filesystem::guessExtension
 * @method static null|string guessExtension(string $path)
 * @see Filesystem::getRequire
 * @method static mixed getRequire(string $path, array $data = [])
 * @see Filesystem::basename
 * @method static string basename(string $path)
 * @see Filesystem::isEmptyDirectory
 * @method static bool isEmptyDirectory(string $directory, bool $ignoreDotFiles = false)
 * @see Filesystem::size
 * @method static int size(string $path)
 * @see Filesystem::lastModified
 * @method static int lastModified(string $path)
 * @see Filesystem::isReadable
 * @method static bool isReadable(string $path)
 * @see Filesystem::name
 * @method static string name(string $path)
 * @see Filesystem::files
 * @method static \Symfony\Component\Finder\SplFileInfo[] files(string $directory, bool $hidden = false)
 * @see Filesystem::cleanDirectory
 * @method static bool cleanDirectory(string $directory)
 * @see Filesystem::hash
 * @method static string hash(string $path, string $algorithm = 'md5')
 * @see Filesystem::deleteDirectories
 * @method static bool deleteDirectories(string $directory)
 * @see Filesystem::extension
 * @method static string extension(string $path)
 * @see Filesystem::link
 * @method static bool|null link(string $target, string $link)
 * @see Filesystem::glob
 * @method static array glob(string $pattern, int $flags = 0)
 * @see Filesystem::delete
 * @method static bool delete(array|string $paths)
 * @see Filesystem::requireOnce
 * @method static mixed requireOnce(string $path, array $data = [])
 * @see Filesystem::get
 * @method static string get(string $path, bool $lock = false)
 * @see Filesystem::missing
 * @method static bool missing(string $path)
 * @see Filesystem::directories
 * @method static array directories(string $directory)
 * @see Filesystem::chmod
 * @method static mixed chmod(string $path, int|null $mode = null)
 * @see Filesystem::json
 * @method static array json(string $path, int $flags = 0, bool $lock = false)
 * @see Filesystem::copy
 * @method static bool copy(string $path, string $target)
 * @see Filesystem::lines
 * @method static array|\Generator lines(string $path)
 * @see Filesystem::move
 * @method static bool move(string $path, string $target)
 * @see Filesystem::isDirectory
 * @method static bool isDirectory(string $directory)
 * @see Filesystem::moveDirectory
 * @method static bool moveDirectory(string $from, string $to, bool $overwrite = false)
 * @see Filesystem::sharedGet
 * @method static string sharedGet(string $path)
 * @see Filesystem::replaceInFile
 * @method static void replaceInFile(array|string $search, array|string $replace, string $path)
 * @see Filesystem::deleteDirectory
 * @method static bool deleteDirectory(string $directory, bool $preserve = false)
 * @see Filesystem::makeDirectory
 * @method static bool makeDirectory(string $path, int $mode = 0755, bool $recursive = false, bool $force = false)
 * @see Filesystem::exists
 * @method static bool exists(string $path)
 * @see Filesystem::mimeType
 * @method static false|string mimeType(string $path)
 * @see Filesystem::allFiles
 * @method static \Symfony\Component\Finder\SplFileInfo[] allFiles(string $directory, bool $hidden = false)
 * @see Filesystem::append
 * @method static int append(string $path, string $data, bool $lock = false)
 * @mixin Filesystem
 */
class File
{
    /**
     *
     * @param string $name
     * @param array $arguments
     * @return mixed
     */
    public static function __callStatic(string $name, array $arguments)
    {
        return (new FileSystem())->{$name}(...$arguments);
    }
}